Article 131 of the Islamic Republic’s constitution states that in the event that a president dies, resigns, becomes incapacitated, or is dismissed for more than two months, or his term in office ends and the new president is not elected due to obstacles, the first vice president becomes the interim president.
Later, a council comprised of the heads of the Executive, Legislative, and Judicial branches is organized to prepare the ground for presidential election within 50 days.
Source: Press TV